<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"><title>系统手机串号一览</title>
<head th:replace="common/incHead :: incHead"></head>
<body class="gray-bg">
<div class="ok-body">
    <form class="layui-form layui-form-pane" lay-filter="pagerForm" id="pagerForm" action="/base/const/imsi" method="get">
        <input type="hidden" id="pageNum" name="pageNum" value="1"/>
        <input type="hidden" name="numPerPage" th:value="${page?.numPerPage}"/>
        <input type="hidden" name="orderField" th:value="${orderField}"/>
        <input type="hidden" name="orderDirection" th:value="${orderDirection}"/>
        <div class="layui-row pa-condition">
            <div class="layui-row">
                <div th:replace="common/plugin :: pa-input-cond('userImsi','用户手机串号','layui-col-md2',${userImsi})"></div>
                <div th:replace="common/plugin :: pa-input-cond('userPhone','用户手机号','layui-col-md2',${userPhone})"></div>
                <div th:replace="common/plugin :: pa-input-cond('providerId','运营商编码','layui-col-md2',${providerId})"></div>
                <div th:replace="common/plugin :: pa-input-cond('provinceId','省份编码','layui-col-md2',${provinceId})"></div>
                <div th:replace="common/plugin :: pa-input-cond('cityId','城市编码','layui-col-md2',${cityId})"></div>
                <button class="layui-btn layui-btn-sm layui-btn-primary pull-right m-l-xs" title="重置数据" type="reset"><i class="layui-icon layui-icon-return"></i>重置</button>
                <button class="layui-btn layui-btn-sm layui-btn-normal pull-right btnPagerForm" title="重新检索"><i class="layui-icon layui-icon-search"></i>重新检索</button>
            </div>
        </div>
    </form>
    <div class="layui-row ljLayTableBox m-b-xl">
        <table class="layui-hide" id="indexTable" lay-filter="indexTable"></table>
    </div>
</div>
<div th:replace="common/incBottom :: incBottom"></div>
<div th:replace="common/incPage :: incPage"></div>
<!-- 初始化表格数据 -->
<script th:inline="javascript">
    /*<![CDATA[*/
    let indexData = [];
    let initSort = {
        field: [[${orderField}]] || 'id',
        type: [[${orderDirection}]] || 'desc'
    };
    /*[# th:each="item,itemStat:${records}"]*/
    indexData.push({
        id: [[${item.id}]],
        userImsi: [[${item.userImsi}]],
        userPhone: [[${item.userPhone}]],
        userSmsp: [[${item.userSmsp}]],
        providerId: [[${item.providerId}]],
        provinceId: [[${item.provinceId}]],
        cityId: [[${item.cityId}]],
        matchLevel: [[${item.matchLevel}]],
        userImei: [[${item.userImei}]],
        userIp: [[${item.userIp}]],
        dataStatus: [[${item.dataStatus}]],
        createTime: [[${@lj.date(item.createTime)}]]
    });
    /*[/]*/
    /*]]>*/
</script>
<script th:inline="none">
    layui.use(["jquery", "table", "okLayer", "okPapper", "okUtils"], function () {
        let table = layui.table;
        let okPapper = layui.okPapper;
        let $ = layui.jquery;
        let okUtils = layui.okUtils;
        let config = okUtils.local("okConfig") || okConfig || {};
        table.render({
            elem: '#indexTable',
            id: 'indexTable',
            height: 'full-118',
            page: false,
            initSort: initSort,
            data: indexData,
            limit: indexData.length,
            toolbar: false,
            size: config.tableSize,
            cols: [[
                {field: "id", title: "自增ID", fixed: "left", width: 100, sort: true},
                {field: "userImsi", title: "用户手机串号", width: 150},
                {field: "userPhone", title: "用户手机号", width: 150},
                {field: "userSmsp", title: "用户短信中心号", width: 150},
                {field: "providerId", title: "运营商编码", width: 150},
                {field: "provinceId", title: "省份编码", width: 150},
                {field: "cityId", title: "城市编码", width: 150},
                {field: "matchLevel", title: "城市编码", width: 150},
                {field: "userImei", title: "手机设备号", width: 150},
                {field: "userIp", title: "登陆IP", width: 150},
                {field: "createTime", title: "添加时间", width: 150},
                {title: "操作", width: 220, align: "center", fixed: "right", templet: "#operationTpl"}
            ]],
            done: function (res, curr, count) {
            }
        });
        table.on('sort(indexTable)', function (obj) {
            $("input[name='orderField']").val(obj.field);
            $("input[name='orderDirection']").val(obj.type);
            $("#pagerForm").submit();
        });
        okPapper.init();
        okLoading.close($);
    })
</script>
<!-- 默认统一操作模板 -->
<script type="text/html" id="operationTpl">
    <button th:if="${@lj.limit('BaseConstImsiEdit')>0}" class="layui-btn layui-btn-xs" title="系统手机串号一览编辑:{{d.id}}" ljUrl="/base/const/imsi/edit?id={{d.id}}" ljWidth="800px" target="ljOpenSubmit"><i class="layui-icon layui-icon-edit"></i>编辑</button>
    <button th:if="${@lj.limit('BaseConstImsiDetail')>0}" class="layui-btn layui-btn-xs layui-btn-normal" title="系统手机串号一览详情:{{d.id}}" ljUrl="/base/const/imsi/detail?id={{d.id}}" target="ljOpenCon"><i class="layui-icon layui-icon-form"></i>详情</button>
    <button th:if="${@lj.limit('BaseConstImsiDel')>0}" class="layui-btn layui-btn-xs layui-btn-danger" title="确认要删除该系统手机串号一览吗?" ljUrl="/base/const/imsi/del?id={{d.id}}" target="ljAjaxTodo"><i class="layui-icon layui-icon-delete"></i>删除</button>
</script>
</body>
</html>